# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>

pkgname=ud3tn
pkgver=0.12.0
pkgrel=0
pkgdesc="uD3TN is a free, lean, and space-tested DTN protocol implementation"
url="https://d3tn.com/ud3tn.html"
arch="all !armhf !armv7 !s390x !x86" # segmentation fault running test
license="( Apache-2.0 OR BSD-3-Clause ) AND BSD-3-Clause AND MIT"
makedepends="libcbor-dev"
subpackages="$pkgname-doc"
source="https://gitlab.com/d3tn/ud3tn/-/wikis/uploads/ca1bf09192946cb1faeedacd8eac5a74/ud3tn-v0.12.0.zip"

builddir="$srcdir"/"$pkgname"-v"$pkgver"

build() {
	make -j1 type=release posix
}

check() {
	make -j1 type=release run-unittest-posix
}

package() {
	install -Dm755 build/posix/ud3tn -t "$pkgdir"/usr/bin/

	install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="
70d27576c48a4c5f3b2918960842237cb49370e4e2a4612c185f4185238c8754e28bab08f0f14316aa7f9f41f066f7bcfda0e47f2937759da5617adcff14d07b  ud3tn-v0.12.0.zip
"
